/*
2021-7-13
https://ac.nowcoder.com/acm/contest/17942/D
*/
#include<iostream>
 
using namespace std;
 
int main()
{
    string s;
    cin >> s;
    
    while(1)
    {
        if(s.size()==1)
        {
            cout << s << endl;
            return 0;
        }
        
        string temp = "";
        for(int i = 0;i < s.size(); ++ i)
        {
            if (i == s.size() - 1) temp += s[i], ++ i;
            if (s[i] != s[i + 1]) temp += s[i];
            else ++ i;
        }
        
        if(temp.size() == s.size())
        {
            cout << temp << endl;
            return 0;
        }
        s = temp;
    }
    
    return 0;
}
